package com.ljs.springloopdependencies.bean;

import lombok.Data;

import java.io.Serializable;

@Data
public class Book1 implements Serializable {
    //创建属性
    private String bname;
    private String bauthor;
    /**
     * 初始化方法
     * */
    public void myInit() {
        System.out.println("book bean被创建");
    }

    /**
     * 销毁时方法
     * */
    public void myDestory() {
        System.out.println("book bean被销毁");
    }

    @Override
    public String toString() {
        return "Book{" +
                "bname='" + bname + '\'' +
                ", bauthor='" + bauthor + '\'' +
                '}';
    }
}
